import request from '@/utils/request'

// 设备管理

// 分页查询
export function getList(data) {
    return request({
        url: '/fault/information/list',
        method: 'get',
        params: data
    })
}
// 下载模版
export function downloadTemplate(data) {
    return request({
        url: '/fault/information/download',
        method: 'get',
        params: data,
        responseType: 'blob'
    })
}
// 批量导入
export function batchSave(data) {
    return request({
        url: '/fault/information/batchSave',
        method: 'post',
        data
    })
}
// 删除
export function deleteFault(data) {
    return request({
        url: `/fault/information/del/${data}`,
        method: 'delete'
    })
}
// 查询详情
export function getDetail(data) {
    return request({
        url: '/fault/information/query',
        method: 'get',
        params: data
    })
}

// 保存
export function save(data) {
    return request({
        url: '/fault/information/save',
        method: 'put',
        data
    })
}


// 故障名称列表查询
export function getFaultAll() {
    return request({
        url: '/fault/information/faultName/list',
        method: 'get'
    })
}
